<template>
  <div id="orders" :class="styleTypeClass" :style="{width,height:'100%'}">
    <!-- 默认样式-->
    <template>
      <div class="title">
        <div class="d-flex pt-2 pl-2">
          <span class="title-icon"></span>
          <span class="fs-xl text mx-2">项目管理数量</span>
        </div>
      </div>
      <div class="mt-3" style="height:95%">
        <EchartsIndex :options="options"/>
      </div>
    </template>
  </div>
</template>

<script>
import mixin from '../mixin/index'
import mixinEcharts  from '../mixin/echarts'
export default {
  name: "Users",
  mixins: [mixin,mixinEcharts],
  components: {},
  data(){
    return {
      options:{
        xAxis: {
          type: 'category',
          data: ['绿城小区','书香华府','翠湖家园南区',]
        },
        yAxis: {
          type: 'value',
          min:0,
          max:100,
          interval: 20
        },
        series: [
          {
            data: [3, 0, 0,],
            type: 'bar'
          }
        ]
      }
    }
  },
  props:{
    totalCount:{
      type: Number,
      default: 0
    },
    loginCount:{
      type: Number,
      default: 0
    },
    createCount:{
      type: Number,
      default: 0
    },
  },
  computed:{},

  watch:{
    totalCount() {
      this.options.title.text = '总数量\n' + this.totalCount
    },
    loginCount() {
      this.options.series[0].data[0].value = this.loginCount
    },
    createCount() {
      this.options.series[0].data[1].value = this.createCount
    }
  },
}
</script>

<style lang="scss" scoped>
@import '@/styles/datav/infoPlatform.scss';
</style>
